// pages/publish/publish.js
Page({
  data: {
    categories: ['数码', '服装', '家居', '图书', '其他'],
    categoryIndex: 0,
    conditions: ['全新', '9成新', '7成新', '5成新'],
    conditionIndex: 0,
    locations: ['北京', '上海', '广州', '深圳', '杭州'],
    locationIndex: 0,
    onlineSelected: true
  },

  selectOnline() {
    this.setData({ onlineSelected: true })
  },

  selectOffline() {
    this.setData({ onlineSelected: false })
  }
})